<template>
  <div>
    <div>
      <keep-alive>
        <router-view></router-view>
      </keep-alive>
    </div>
    <div class="navigation">
      <p @click="arrive('homepage')">首页</p>
      <p @click="arrive('find')">找房</p>
      <p @click="arrive('particulars')">咨询</p>
      <p @click="arrive('my')">我的</p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'subject',
  methods: {
    arrive(name) {
      this.$router.push({ name }, () => {})
    },
  },
}
</script>

<style scoped>
.navigation {
  display: flex;
  justify-content: space-around;
  position: sticky;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50px;
  line-height: 50px;
  text-align: center;
  display: flex;
  background: #fff;
  border-top: 1px solid #e4e4e4;
}
p {
  margin: 0 auto;
}
</style>
